<template>
  <the-table
    ref="table"
    :columns="columns"
    uri="s/balances/report"
    :slots="['balance']"
  >
    <span
      slot="balance"
      slot-scope="{ row }"
      :class="row.type == 'sell' ? 'blue' : 'red'"
      >{{ row.type == 'sell' ? '+' : '-' }} {{ row.value }}</span
    >
  </the-table>
</template>
<script>
import theTable from '@/components/theTable.vue'

const columns = [
  {
    title: '日期',
    dataIndex: 'date',
  },
  {
    title: '买币+',
    dataIndex: 'sell',
  },
  {
    title: '卖币-',
    dataIndex: 'buy',
  },
  {
    title: '手续费',
    dataIndex: 'fee',
  },
  {
    title: '支出奖励',
    dataIndex: 'tip',
  },
  {
    title: '已处理',
    dataIndex: 'done_coins',
  },
  {
    title: '已处理笔数',
    dataIndex: 'done_count',
  },
  {
    title: '未处理',
    dataIndex: 'undone_coins',
  },
  {
    title: '未处理笔数',
    dataIndex: 'undone_count',
  },
]

export default {
  components: { theTable },

  data() {
    return {
      columns,
    }
  },
  mounted() {},
  methods: {},
}
</script>
